﻿using AiXiu.BLL;
using AiXiu.IBLL;
using AiXiu.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AiXiu.WebStite
{
    public partial class MyVideos : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //获取Id
                TBUsers tBUsers = IdentityManager.ReadUser();
                int userId = tBUsers.Id;
                //查询视频
                IVideoManager video = new VideoManager();
                List<TBvideos> tBvidos= video.GetVideosByUserId(userId);
                //绑定到页面
                rptVideos.DataSource=tBvidos;
                rptVideos.DataBind();

            }
        }
        public string GetVideoStatus(string status)
        {
            switch (status)
            {
                case "1":
                    return "上传中";
                case "2":
                    return "上传失败";
                case "3":
                    return "上传成功";
                case "4":
                    return "转码中";
                case "5":
                    return "转码失败";
                case "6":
                    return "屏蔽";
                case "7":
                    return "正常";
                case "0":
                default:
                    return "未知";

            }
        }
    }
}